" vim:ft=vim
" Test utility
"

Execute(ensure_argc() works with argc <= atmost);
function! MyFunc(...)
  let argc = object#util#ensure_argc(1, a:0)
  return argc
endfunction

AssertEqual MyFunc(), 0
AssertEqual MyFunc(1), 1
AssertThrows call MyFunc(1,2)
AssertThrows call MyFunc(1,2,3)


Execute (has_special_variables() can detect 4 special vars);
if object#util#has_special_variables()
  Assert v:false is v:false
  Assert v:true is v:true
  Assert v:none is v:none
  Assert v:null is v:null
else
  let names = ['v:false', 'v:none', 'v:null', 'v:true',]
  for x in names
    AssertEqual 0, exists(x)
  endfor
endif
